import { computed } from 'vue'
import { useRoute } from 'vue-router'

export function useAuth() {
  const route = useRoute()

  const auths = computed(() => {
    const auths: string[] = route.meta.auths as string[] || []
    return new Set(auths)
  })

  return auths
}
